﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Business.ValueObject.Context;
using Business.ValueObject.SISCONVE;
using DataAccess.Contract;
using DataAccess.DNPC.Mapper;
using DataAccess.Model;

namespace DataAccess.Core
{
    public class DAOPerformanceReportVehicles : IDAOPerformanceReportVehicles
    {
        private DNPCEntities DBContext { get; set; }
        private VOServiceContext RepositoryContext { get; set; }

        public DAOPerformanceReportVehicles(DNPCEntities dbContext,VOServiceContext repositoryContext)
        {
            DBContext = dbContext;
            RepositoryContext = repositoryContext;
        }

        public void insert(VOPerformanceReportVehicle performanceReport)
        {
            CachePerformanceReportVehicle modelEntity = Mapper.MapBusinessVOPerformanceReportVehicleToCachePerformanceReportVehicleModelData(performanceReport);
            DBContext.CachePerformanceReportVehicles.Add(modelEntity);
        }

        public bool member(string code)
        {
            throw new NotImplementedException();
        }

        public void delete(string code)
        {
            throw new NotImplementedException();
        }

        public VOPerformanceReportVehicle find(string code)
        {
            throw new NotImplementedException();
        }

        public void DeleteAllObjects()
        {
            foreach (var item in DBContext.CachePerformanceReportVehicles)
            {
                DBContext.CachePerformanceReportVehicles.Remove(item);
            }
        }
    }
}
